<script lang="ts">
import { Component, defineComponent, PropType } from "vue";
import ElInput from "@/components/input";
import { RepeatClick } from "@/directives";
import { ComponentSize } from "@/constants";
import { isValidComponentSize } from "@/utils/validators";
interface IData {
  currentValue: number | string;
  userInput: null | number | string;
}

export default defineComponent({
  name: "ElInputNumber",
  components: {
    ElInput,
  },
  directives: {
    RepeatClick,
  },
  props:{
    step:{
      type:Number,
      default:1
    },
    stepStrictly:{
      type: Boolean,
      default: false
    },
    max:{
      type: Number,
      default: Infinity
    },
    min:{
      type: Number,
      default: Infinity
    },
    modelValue:{
      type:Number
    },
    disabled:{
      type: Boolean,
      default:false
    },
    size:{
      type:String as PropType<ComponentSize>,
      validator: isValidComponentSize,
    },
    controls:{
      type:Boolean,
      default: true
    },
    controlsPosition:{
         type: String,
         default:''
    },
    name:String,
    label:String,
    placeholder:String,
    precision:{
      type:Number,
      validator:(val:number)=>val>=0&&val===parseInt(`${val}`,10)
    }
  },
  emit:['update:modelValue','change','input','blur','focus'],




  
  setup() {

  },
});
</script>
